package ar.uba.is2.common.config;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;

public abstract class AbstractConfiguracion {

	private static final Logger logger = Logger.getLogger(AbstractConfiguracion.class);
	
	public void init(){
		configurarLogging();
		logger.info("Inicializando configuracion de EC");
		doInit();
		logger.info("Configuracion terminada");
	}
	
	protected void configurarLogging() {
		PropertyConfigurator.configure(ClassLoader.getSystemResource(getLoggingFilename()));
	}

	protected abstract void doInit();

	protected abstract String getLoggingFilename();
}
